package com.wswy.wzcx.model.license;

import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.gson.annotations.SerializedName;

public class CheckLicenseAvailableModel implements android.os.Parcelable {
  @SerializedName("cityId")
  public int id;
  @SerializedName("cityName")
  public String name;
  @SerializedName("provinceAbbr")
  public String province;
  @SerializedName("licenseInitial")
  public String licenseInitial;
  @SerializedName("isSupport")
  public int isSupport;
  @SerializedName("frameno")
  public int frameNo;
  @SerializedName("engineno")
  public int engineNo;


  public boolean isSupport(){
    return isSupport == 1;
  }


  @Override
  public int describeContents() {
    return 0;
  }

  @Override
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.id);
    dest.writeString(this.name);
    dest.writeString(this.province);
    dest.writeString(this.licenseInitial);
    dest.writeInt(this.isSupport);
    dest.writeInt(this.frameNo);
    dest.writeInt(this.engineNo);
  }

  public CheckLicenseAvailableModel() {
  }

  protected CheckLicenseAvailableModel(Parcel in) {
    this.id = in.readInt();
    this.name = in.readString();
    this.province = in.readString();
    this.licenseInitial = in.readString();
    this.isSupport = in.readInt();
    this.frameNo = in.readInt();
    this.engineNo = in.readInt();
  }

  public static final Creator<CheckLicenseAvailableModel> CREATOR = new Creator<CheckLicenseAvailableModel>() {
    @Override
    public CheckLicenseAvailableModel createFromParcel(Parcel source) {
      return new CheckLicenseAvailableModel(source);
    }

    @Override
    public CheckLicenseAvailableModel[] newArray(int size) {
      return new CheckLicenseAvailableModel[size];
    }
  };
}
